package com.lei.chinese_herbal_medicine.Entity;

import java.io.Serializable;

public class PageData implements Serializable {
    private Integer page;

    private Integer startIndex;
    private Integer size;
    private Integer count;
    private static final long serialVersionUID = 115L;

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getStartIndex() {
        this.startIndex=(this.page-1)*this.size;
        return startIndex;
    }

    public PageData(Integer page, Integer size) {
        this.page = page;
        this.size = size;
    }

    public PageData() {
    }

    @Override
    public String toString() {
        return "PageData{" +
                "page=" + page +
                ", startIndex=" + startIndex +
                ", size=" + size +
                ", count=" + count +
                '}';
    }
}
